snippet chen "Signature"
Yours sincerely,

Zhixin Chen
endsnippet

snippet today "Date"
`date +%F`
endsnippet

snippet content "content"
\tableofcontents
\newpage
endsnippet

snippet mulu "mulu"
\tableofcontents
\newpage
endsnippet

snippet \e "e"
\varepsilon
endsnippet

snippet label "label"
\label{$1}$0
endsnippet


snippet package "package"
\usepackage{graphicx}
\usepackage{caption2}
\usepackage{subfigure}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{algorithm}  
\usepackage{algorithmicx}  
\usepackage{algpseudocode}  
endsnippet


snippet beg "begin{} / end{}" b
\begin{$1}
	$0
\end{$1}
endsnippet

snippet $$ "$$" i
$$
	$0
$$
endsnippet


snippet chinese "chinese" b
\documentclass{article}
\usepackage{CJKutf8}
\usepackage{graphicx}
\usepackage{caption2}
\usepackage{subfigure}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{algorithm}  
\usepackage{algorithmicx}  
\usepackage{algpseudocode}  
\usepackage{amssymb}
\usepackage[colorlinks, linkcolor=black]{hyperref}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%
 % 修改标题文字到中文。
 %%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\today}{\number\year 年 \number\month 月 \number\day 日}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}  % Use Input in the format of Algorithm  
\renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm  
\renewcommand{\contentsname}{目录}
\renewcommand{\abstractname}{摘要}
\renewcommand{\refname}{参考文献}   % 将References改为参考文献
\renewcommand{\indexname}{索引}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
\renewcommand{\appendixname}{附录}

 %%%%%%%%%%%%%
 % 页边距设置
 %%%%%%%%%%%%%
\addtolength{\topmargin}{-54pt}
\setlength{\oddsidemargin}{0.63cm}  % 3.17cm - 1 inch
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{14.66cm}
\setlength{\textheight}{24.00cm}    % 24.62

 %%%%%%%%%%%%%%%%%%%%%%
% 设置字号 使用方法：{\xiaosi text}
 %%%%%%%%%%%%%%%%%%%%%%
\newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont}
\newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont}
\newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont}
\newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont}
\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont}
\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont}
\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}
\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont}
\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont}
\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont}
\newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont}
\newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont}

 %%%%%%%%%%%
 % 段首缩进
 %%%%%%%%%%%
\makeatletter
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
\makeatother
\setlength{\parindent}{2em}  %中文缩进两个汉字位


\begin{document}
	\begin{CJK}{UTF8}{gkai}
		$0
		\newpage
	\end{CJK}
\end{document}

endsnippet

snippet zuozhe "zuozhe"
\title{$1}
\author{陈智鑫 \\\\email: zhixinc@buaa.edu.cn\\\\ phone: 13020037060 \\\\学号: SY1807513\\\\[2ex]
	\xiaosihao 软件开发环境国家重点实验室\\\\[2ex]
}
\date{$2}$0
endsnippet

snippet fengmian "fengmian"
\title{$1}
\author{陈智鑫 \\\\email: zhixinc@buaa.edu.cn\\\\ phone: 13020037060 \\\\学号: SY1807513\\\\[2ex]
	\xiaosihao 软件开发环境国家重点实验室\\\\[2ex]
	{\protect\includegraphics[scale=0.5]{${2:beihang.pdf}}}
}
\date{$3}
\maketitle
\newpage$0
endsnippet

snippet kai "kai"
\begin{CJK}{UTF8}{gkai}
	$0
\end{CJK}
endsnippet


snippet song "song"
\begin{CJK}{UTF8}{gbsn}
	$0
\end{CJK}
endsnippet


snippet sec "sec"
\section{$0}
endsnippet

snippet subsec "subsec"
\subsection{$0}
endsnippet


snippet graph "graph"
\begin{figure}[H] %figure环境，可于此处加[h]来固定位置。
	\centering  %使图片居中显示
	\includegraphics[scale=0.5]{$1.png} %图片尺寸及位置。
	\caption{$2} %图题
	\label{$3} %标签，方便在文章中引用图片。
\end{figure} %figure环境$0
endsnippet

snippet multigraph "multigraph"
\begin{figure}[H] %figure环境，可于此处加[h]来固定位置。
	\centering  %使图片居中显示
	\subfigure[$1]{ % 填子图图题
		\includegraphics[scale=0.5]{$2.png}
	}
	\quad
	\subfigure[$3]{
		\includegraphics[scale=0.5]{$4.png}
	}
	\caption{$5} %图题
	\label{$6} %标签，方便在文章中引用图片。
\end{figure}
endsnippet

snippet addgraph "addgraph"
\quad
\subfigure[$1]{
	\includegraphics[scale=0.5]{$2.png}
}
endsnippet

snippet equation "equation"
\begin{equation}
	$0
\end{equation}
endsnippet

snippet para "para"
\paragraph{$1}\ $0
endsnippet

snippet title "title"
\title{$1}  %文章标题
\author{$2}   %作者的名称
\date{${3:\today}}       %日期
\maketitle          %添加这一句才能够显示标题等信息

endsnippet

snippet algorithm "algorithm"
\begin{algorithm}[H]
	\caption{$4}
	\label{$5}
	\begin{algorithmic}[1]
		\Require $1 %输入
		\Ensure $2  %输出
		\Function {$3}{$1}
			\State  %变量赋值
			\If{}

			\EndIf

			\State \Return{}
		\EndFunction
	\end{algorithmic}
\end{algorithm}
endsnippet

snippet box "box" b
`!p 
slist = t[1].split('\n')
llist = []
for s in slist:
	llist.append(int((len(s.encode('utf-8'))-len(s))/2) + len(s))
snip.rv = ' ' + '%' * (max(llist) + 3) + '%\n' + ' %' + ' ' * (max(llist) + 2) + '%'`
 % $1 %
`!p 
slist = t[1].split('\n')
llist = []
for s in slist:
	llist.append(int((len(s.encode('utf-8'))-len(s))/2) + len(s))
snip.rv = ' %' + ' ' * (max(llist) + 2) + '%\n' + ' ' + '%' * (max(llist) + 3) + '%'`$0
endsnippet

snippet py "py"
\begin{colorboxed}  
	\begin{lstlisting}[language={Python},numbers=left,numberstyle=\tiny,%frame=shadowbox,
		rulesepcolor=\color{red!20!green!20!blue!20},  
		keywordstyle=\color{blue!70!black},  
		commentstyle=\color{gray},
		escapeinside=\`\`,
		breaklines=true,
		frame=single,
		tabsize=4,
		basicstyle=\ttfamily]
$0
	\end{lstlisting}
\end{colorboxed}
endsnippet


snippet java "java"
\begin{colorboxed}  
	\begin{lstlisting}[language={Java},numbers=left,numberstyle=\tiny,%frame=shadowbox,
		rulesepcolor=\color{red!20!green!20!blue!20},  
		keywordstyle=\color{blue!70!black},  
		commentstyle=\color{gray},
		escapeinside=\`\`,
		breaklines=true,
		frame=single,
		tabsize=4,
		basicstyle=\ttfamily]
$0
	\end{lstlisting}
\end{colorboxed}
endsnippet

snippet item "item"
\begin{itemize}
	\item $1
	\item $2
\end{itemize}
endsnippet

snippet enum "enum"
\begin{enumerate}
	\item $1
	\item $2
\end{enumerate}
endsnippet

snippet block "beautiful block"
\newtcolorbox{$1}{
	breakable,
	fonttitle=\bfseries,
	title={$2}
}
\begin{$1}
$0
\end{$1}
endsnippet

snippet table "table"
\begin{table}
	\centering
	\caption{$0}
	\begin{tabular}{ccc}
		\toprule % 表头
		1 & 2 & 3\\\\
		\midrule % 表项
		4 & 5 & 6\\\\
		\botrule % 表尾
		7 & 8 & 9\\\\
	\end{tabular}
\end{table}
endsnippet

snippet red "color-red" i
{\color{red} $0}
endsnippet

snippet blue "blue" i
{\color{blue} $0}
endsnippet

snippet yellow "yellow" i
{\color{yellow} $0}
endsnippet

snippet luotianyi "luotianyi" i
{\color[HTML]{66CCFF} $0}
endsnippet

snippet chuyin "chuyin" i
{\color[HTML]{66FFCC} $0}
endsnippet
snippet redbox "redbox"
\colorbox{red}{
	\vbox{
		$0
	}
}
endsnippet

snippet tianyibox "tianyibox"
\colorbox[HTML]{66CCFF}{
	\vbox{
		$0
	}
}
endsnippet

snippet bf "bf" i
\textbf{$1}$0
endsnippet
